import scrapy


class ListSpider(scrapy.Spider):
    """列表爬虫"""
    name = "list"

    def start_requests(self):
        urls = [
            "http://tl.cyg.changyou.com/goods/selling?world_id=3128&area_name=%25E8%25B6%2585%25E7%25BA%25A7%25E7%2594%25B5%25E4%25BF%25A1&world_name=%25E5%2580%25BE%25E5%259B%25BD%25E5%2580%25BE%25E5%259F%258E&profession=8&have_chosen=profession"
        ]
        for url in urls:
            yield scrapy.Request(url=url, callback=self.parse)

    def parse(self, response, **kwargs):

        for item in response.selector.xpath('//*[@id="J_good_list"]/li'):
            self.log(item)
